{include file="common/_meta" /}
<title>修改</title>
<meta name="keywords" content="李志立，lizhilimaster@163.com">
<meta name="description" content="李志立，lizhilimaster@163.com">
</head>
<body>
	<div class="page-container">
		<form action="" method="post"  enctype="multipart/form-data"  class="form form-horizontal" id="form-category-add">
			<input type="hidden" name="id" value="{$data.id}" />
			<div class="row cl">
							<label class="form-label col-xs-3 col-sm-2">图片：</label>
							<div class="formControls col-xs-9 col-sm-9">
								<div class="uploader-thum-container">
									<a href="javascript:void();" class="btn btn-primary radius"><i class="icon Hui-iconfont">&#xe642;</i> 浏览文件</a>
									<input type="file" class="input-file" onchange='onpic(this)' name="img"  value="" accept='image/*' style="font-size: 20px;left:0;" /><span calss="sp"></span>
								</div>
								<div style="margin-top: 15px;">
									{if condition="$data.img != ''"}
									<img src="{$data.img}" height="60" style="margin: 20px;" />
									{else /}
									<div>暂无缩率图</div>
									{/if}
								</div>
							</div>
						</div>

			<div class="row cl">
				<label class="form-label col-xs-3 col-sm-2"><span class="c-red">*</span>媒体 ：</label>
				<div class="formControls col-xs-9 col-sm-9">
					<input type="text" class="input-text" value="{$data.meiti}" placeholder="" id="meiti" name="meiti">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-3 col-sm-2"><span class="c-red">*</span>职位 ：</label>
				<div class="formControls col-xs-9 col-sm-9">
					<input type="text" class="input-text" value="{$data.zhiwei}" placeholder="" id="zhiwei" name="zhiwei">
				</div>
			</div>
			<div class="row cl">
							<label class="form-label col-xs-3 col-sm-2"><span class="c-red">*</span>姓名 ：</label>
							<div class="formControls col-xs-9 col-sm-9">
								<input type="text" class="input-text" value="{$data.name}" placeholder="" id="name" name="name">
							</div>
						</div><div class="row cl">
							<label class="form-label col-xs-3 col-sm-2"><span class="c-red">*</span>性别 ：</label>
							<div class="formControls col-xs-9 col-sm-9">
								<input type="text" class="input-text" value="{$data.sex}" placeholder="" id="sex" name="sex">
							</div>
						</div><div class="row cl">
							<label class="form-label col-xs-3 col-sm-2"><span class="c-red">*</span>编号 ：</label>
							<div class="formControls col-xs-9 col-sm-9">
								<input type="text" class="input-text" value="{$data.no}" placeholder="" id="no" name="no">
							</div>
						</div><div class="row cl">
							<label class="form-label col-xs-3 col-sm-2"><span class="c-red">*</span>部门 ：</label>
							<div class="formControls col-xs-9 col-sm-9">
								<input type="text" class="input-text" value="{$data.bumen}" placeholder="" id="bumen" name="bumen">
							</div>
						</div>

			<div class="row cl">
				<label class="form-label col-xs-3 col-sm-2"><span class="c-red">*</span>状态 ：</label>
				<div class="formControls col-xs-9 col-sm-9">
					<input type="text" class="input-text" value="{$data.status}" placeholder="" id="status" name="status">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-3 col-sm-2"><span class="c-red">*</span>发证时间 ：</label>
				<div class="formControls col-xs-9 col-sm-9">
					<input type="datetime-local" class="input-text" value="{$data.time}" placeholder="" id="time" name="time">
				</div>
			</div>
			<div class="row cl">
							<label class="form-label col-xs-3 col-sm-2">内容详情：</label>
						<div class="formControls col-xs-9 col-sm-9">
							<script id="editor" name='text' type="text/plain" style="width:100%;height:400px;">{$data.text|raw}</script>
						</div>
					</div>
			<div class="row cl">
				<div class="col-9 col-offset-2">
					<input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
				</div>
			</div>
		</form>
	</div>
	{include file="common/_footer" /}
	<style type="text/css">
		.li123 {
			line-height: 30px;
			background: burlywood;
			display: inline-block;
			vertical-align: middle;
			padding: 0 8px;
		}
		#abtn,.dtbtn{
			color: red;
		}
	</style>
	<script type="text/javascript" src="__MANAGE__lib/jquery.validation/1.14.0/jquery.validate.js"></script>
	<script type="text/javascript" src="__MANAGE__lib/jquery.validation/1.14.0/validate-methods.js"></script>
	<script type="text/javascript" src="__MANAGE__lib/jquery.validation/1.14.0/messages_zh.js"></script>
	<script type="text/javascript" src="__MANAGE__lib/ueditor/ueditor.config.js"></script>
	<script type="text/javascript" src="__MANAGE__lib/ueditor/ueditor.all.js"> </script>
	<script type="text/javascript" src="__MANAGE__lib/ueditor/lang/zh-cn/zh-cn.js"></script>
	<script type="text/javascript">
		$(function() {
			$('.skin-minimal input').iCheck({
				checkboxClass: 'icheckbox-blue',
				radioClass: 'iradio-blue',
				increaseArea: '20%'
			});
			let wo=$("#form-category-add").validate({
				rules: {
					zhiwei: {	required	: true	},
					meiti: {	required	: true	},
					name: {	required	: true	},sex: {	required	: true	},no: {	required	: true	},time: {	required	: true	},status: {	required	: true	},bumen: {	required	: true	},
				},
				submitHandler:function(form) {
					$("input[type=\"submit\"]").addClass('disabled').attr("disabled",true);
					var index = layer.load(1, {
						shade: [0.1,'#fff'] //0.1透明度的白色背景
					});
					setTimeout(()=>{
						$("input[type=\"submit\"]").removeClass('disabled').attr("disabled",false);
						layer.close(index);
					},1000)
					form.submit();
				}
			});
			var ue = UE.getEditor('editor');
		});

		function textlength() {
			var nmb=$('#desc').val().length;
			if(nmb>200){
				$('#desc').css("background-color","orangered");
				$('#desc').val($('#desc').val().substr(0,200));
				$('.textarea-length').text(200);
			}else{
				$('#desc').css("background-color","white");
				$('.textarea-length').text(nmb);
			}
		}
		function onpic(e) {
			$(e).parent().find('span').html(e.files[0].name).addClass('li123');
		}
	</script>
</body>
</html>
